import logging,yagmail

def set_log():
    logging.basicConfig(filename='./log/xxqg.txt',filemode='w+',level=logging.DEBUG,format='%(asctime)s -> %(levelname)s ->%(filename)s ->%(message)s')

def send_mail(filepath):
    mail = yagmail.SMTP(user='774877770@qq.com',password='fjvmkwjdijkfbajg',host='smtp.qq.com')
    mail.send(to='1522057104@qq.com',subject='唯品会',contents='唯品会',attachments=filepath)

import yaml

def get_data_yaml(filename):
    with open(filename,'r',encoding='utf-8')as f:
        return yaml.safe_load(f)